<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>余额提现</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header"><i class="fa fa-cog"></i> 余额提现</div>
          <div class="layui-card-body" pad15>
            <div class="layui-form form-label-w6" lay-filter="">
              <div class="layui-form-item">
                <label class="layui-form-label">可提现余额：</label>
								<div class="layui-form-mid"><span style="font-size:16px;font-weight:bold">{$money}</span> 元</div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label">提现金额：</label>
                <div class="layui-input-inline">
									<input type="text" name="info[money]" class="layui-input" value="{$money}">
                </div>
								<div class="layui-form-mid">元</div>
              </div>
							
              <div class="layui-form-item">
                <label class="layui-form-label">提现方式：</label>
                <div class="layui-input-inline" style="width:500px">
									{if $bset['withdraw_bankcard']==1}<input type="radio" name="info[paytype]" value="银行卡" title="银行卡" checked lay-filter="paytype">{/if}
									{if $bset['withdraw_weixin']==1}<input type="radio" name="info[paytype]" value="微信" title="微信" {if $bset['withdraw_bankcard']==0}checked{/if} lay-filter="paytype">{/if}
									{if $bset['withdraw_aliaccount']==1}<input type="radio" name="info[paytype]" value="支付宝" title="支付宝" {if $bset['withdraw_bankcard']==0 && $bset['withdraw_weixin']==0}checked{/if} lay-filter="paytype">{/if}
                                    {if getcustom('pay_adapay')}
                                      {if $bset['withdraw_adapay']==1}<input type="radio" name="info[paytype]" value="汇付天下" title="汇付天下"  {if $bset['withdraw_bankcard']==0 && $bset['withdraw_weixin']==0 && $bset['withdraw_aliaccount'] ==0}checked{/if} lay-filter="paytype">{/if}
                                    {/if}
                </div>
								<div class="layui-form-mid layui-word-aux layui-clear">
                                  {if $admin_set['wx_transfer_type']==1}
                                  提现方式选择【微信】时，请到前端页面-【商家后台】-【财务】-【提现记录】页面操作收款。<br/>
                                  （注：通过PC端提现时操作收款优先使用微信公众号平台，管理员未在公众号平台绑定微信时使用微信小程序）
                                  {/if}
                                </div>
              </div>
              

							<!-- <div id="txtype11set">
								<div class="layui-form-item">
									<label class="layui-form-label">收款账号</label>
									{if $info['mpopenid']}
									<div class="layui-form-mid"><span style="font-size:16px;"><img src="{$info.headimg}" style="width:60px;height:60px"> {$info.nickname}</div>
									<div style="clear:both;padding-left:130px"><a class="layui-btn layui-btn-primary layui-btn-xs" href="javascript:void(0)" onclick="showqrcode()">更换收款账号</a></div>
									{else}
									<a href="javascript:void(0)" onclick="showqrcode()" class="layui-btn layui-btn-primary layui-btn-sm">请先绑定收款账号</a>
									{/if}
								</div>
							</div>-->
							
							<!-- <div id="txtype1set">
								<div class="layui-form-item">
									<label class="layui-form-label">开户行：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[bankname]" value="{$business['bankname']}" class="layui-input"/>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">持卡人姓名：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[bankcarduser]" value="{$business['bankcarduser']}" class="layui-input"/>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">银行卡号：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[bankcardnum]" value="{$business['bankcardnum']}" class="layui-input"/>
									</div>
								</div>
							</div>
							<div id="txtype2set" style="display:none">
								<div class="layui-form-item">
									<label class="layui-form-label">微信号：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[weixin]" value="{$info['weixin']}" class="layui-input"/>
									</div>
								</div>
							</div>
							<div id="txtype3set" style="display:none">
								<div class="layui-form-item">
									<label class="layui-form-label">支付宝账号：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[alipaynum]" value="{$info['alipaynum']}" class="layui-input"/>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">开户人姓名：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[aliusername]" value="{$info['aliusername']}" class="layui-input"/>
									</div>
								</div>
							</div>-->
              <div class="layui-form-item">
								<label class="layui-form-label"></label>
                <div class="layui-input-block">
                  <button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
                </div>
              </div>
            </div>
            
          </div>
        </div>
      </div>
    </div>
  </div>
	{include file="public/js"/}
	<script>
	layui.form.on('radio(txtype)', function(data){
		return;
		$('#txtype1set').hide();
		$('#txtype2set').hide();
		$('#txtype3set').hide();
		if(data.value == '1'){
			$('#txtype1set').show();
		}else if(data.value == '2'){
			$('#txtype2set').show();
		}else if(data.value == '3'){
			$('#txtype3set').show();
		}
	});
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		var index = layer.load();
		$.post('',field,function(data){
			layer.close(index);
			dialog(data.msg,data.status,data.url);
		})
	})
	
	function showqrcode(id){
			var html = '<div style="margin:auto auto;text-align:center">';
			html+='	<img src="{:url('User/getqrcode')}" style="margin-top:20px;max-width:280px;max-height:280px"/>';
			html+='	<div style="font-size:14px;text-align:left;margin:0 20px">用微信扫码关注绑定</div>';
			html+='</div>';
			layer.open({type:1,area:['300px','350px'],content:html,title:false,shadeClose:true,btn:['已绑定完成'],yes: function(index, layero){
				location.reload();
			}})
	}

    
  </script>
</body>
</html>